<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Admin/webroot/css/style.css"/>
<title>首页</title>
</head>
<script type="text/javascript" src="Admin/webroot/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="Admin/webroot/js/global.js"></script>
<body>
<!--[if IE ]>
<style>.localUpload{ display:none}.msg-s .ke-inline-block{ display:block} </style>
<![endif]-->
<div class="rightbox">
    	<div class="rightbox-col" id="right">
        	<div class="main">
                {include file='../Common/main_title.html'}
                <div class="bd">
                  <div class="main_content">
                    

<div class="left-table"><span>标题:</span></div>
 <div class="right-table"><input type="text" name="title" value="{$ad_img.title}" /></div>
 <div class="height_10"></div>
 
  {if $_CFG.DIGLOSSIA==1}
                                    <div class="left-table"><span class="red">*</span>英文标题：</div>
                                    <div class="right-table"><input type="text" name="en_title" value="{$ad_img.en_title}" placeholder="请输入标题"/></div>
                                    <div class="msg"></div>
                                    <div class="height_10"></div>
                                    {/if}
 
<div class="left-table"><span>描述:</span></div>
<div class="right-table"><input type="text" name="description" value="{$ad_img.description}" /></div>
 <div class="height_10"></div>
<div class="left-table"><span>链接: </span></div>
<div class="right-table"><input type="text" name="url" {if $ad_img.url}value="{$ad_img.url}" {else} value="http://" {/if}/></div>
 <div class="height_10"></div>
<div class="left-table"><span>排序: </span></div>
<div class="right-table"><input type="text" name="ordering" value="{$ad_img.ordering}" /></div>
 <div class="height_10"></div>
<div class="left-table"><span>图片上传: </span></div>
<div class="right-table"><input type="text" id="img_url" disabled="disabled" name="thumb_url" value="{$ad_img.pic_path}" id="thumb"/>

                                        		
                                       
                                        
                                    </div><div class="msg-s"><a href="javascript:;"   class="localUpload" onclick="$(this).next().children('form').children('.ke-upload-file').click()">本地上传</a>
                    <input id="uploadButton_" return_url="img_url" type="button" value="submit" />                   {if $ad_img.pic_path}
<img class="pb mt10" src="{$ad_img.pic_path}" height="80px" width="80px"  />
{/if}     
                                           </div>
                                     <div class="height_10"></div>
<input type="hidden" name="id" value="{$ad_img.id}" />
<input type="hidden" name="flash_id" value="{$flash_id}" />
<input type="submit" value="保存" class="pro-add-sub submit_btn"  />

                  </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
<script type="text/javascript" src="Admin/webroot/js/editor/kindeditor.js"></script>
<script type="text/javascript" src="Admin/webroot/js/kindeditor_upload.js"></script>
<script type="text/javascript">
    $(function(){
			hungry_uploadimg('index.php?g=admin&m=ad&a=file');	
		$('.pro-add-sub').click(function(){
			var action = '{$action}';
			
			var id=($('input[name=id]').val());
			var flash_id=($('input[name=flash_id]').val());
			var title=($('input[name=title]').val());
			var en_title=($('input[name=en_title]').val());
			var description=($('input[name=description]').val());
			var keywords=($('input[name=keywords]').val());
			var url=($('input[name=url]').val());
		    var ordering=($('input[name=ordering]').val());
		    var pic_path=($('input[name=thumb_url]').val());
			
			
			
			$.post('index.php?g=admin&m=ad&a='+action,{ id:id,flash_id:flash_id,title:title,en_title:en_title,description:description,keywords:keywords,ordering:ordering,pic_path:pic_path,url:url},function(result){
				showMsg(result.content,result.url);
			
				},'json');
			})
		
		});
	
</script>
</body>
</html>
